﻿using DFGK_WMS.Model.DTO;
using DFGK_WMS.Model.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace DFGK_WMS.IRepository
{
    public interface IUserRepository:IBaseRepository<TUser>
    {
        /// <summary>
        /// 判断登录
        /// </summary>
        /// <param name="m"></param>
        /// <returns></returns>
        TUser GetLogin(LoginDto m);
        /// <summary>
        /// 判断登录
        /// </summary>
        /// <param name="m"></param>
        /// <returns></returns>
        TUser GetLoginPDA(LoginPDADTO m);

        /// <summary>
        /// 添加用户
        /// </summary>
        /// <param name="m"></param>
        /// <returns></returns>
        bool AddUser(UserRoleDto m);

        /// <summary>
        /// 用户显示
        /// </summary>
        /// <param name="uname">用户名</param>
        /// <param name="rid">角色</param>
        /// <param name="state">状态</param>
        /// <returns></returns>
        List<TUser> GetUserList(string uname,int rid,int state,int pageIndex,int pageSize,out int totalCount);

        /// <summary>
        /// 删除用户
        /// </summary>
        /// <param name="uid"></param>
        /// <returns></returns>
        bool DelUser(int uid);

       /// <summary>
       /// 批量删除用户
       /// </summary>
       /// <param name="ulist"></param>
       /// <returns></returns>
        bool DelUsers(List<TUser> ulist);

        /// <summary>
        /// 根据主键获取用户信息
        /// </summary>
        /// <param name="uid"></param>
        /// <returns></returns>
        UserRoleDto URById(int uid);

        /// <summary>
        /// 修改用户
        /// </summary>
        /// <param name="m"></param>
        /// <returns></returns>
        bool UpdUser(UserRoleDto m);

        /// <summary>
        /// 重置密码
        /// </summary>
        /// <param name="m"></param>
        /// <returns></returns>
        bool UserResetPwd(ResetPwdDto m);

        /// <summary>
        /// 修改密码
        /// </summary>
        /// <param name="m"></param>
        /// <returns></returns>
        bool UserModifyPwd(ModifyPwdDto m);

        /// <summary>
        /// 修改用户状态
        /// </summary>
        /// <param name="m"></param>
        /// <returns></returns>
        bool UpdUserStatus(UpdStatusDto m);
        /// <summary>
        /// 导出
        /// </summary>
        /// <returns></returns>
        List<TUser> GetUserExcel();

        bool AddUserList(List<TUser> list);
    }
}
